Used to represent an activity, process, action, delay, transformation, and so on, within a model. The Operation block takes N items from up to three input streams, holds them for a specified period of time, and releases only one output item.
Item input connectors are located on the left of the block. Each item input connector that is connected must have a "Quantity" of at least 1 specified in the Transformation section of the dialog.
The Operation block allows you to:
• statically set the input requirements to the block
• statically or dynamically set the processing time
• statically or dynamically set or modify the attribute values
• dynamically interrupt and shutdown the operation
This block has four sections, each of which is discussed in detail below:
1) Transforms (batches) multiple inputs into a single item
2) Processes (delays) items for a specified time
3) Sets or changes an item's attributes
4) Shuts down operations if certain conditions occur
1) Transformation:
The block will batch items from up to three inputs into a single item. You specify the quantity of items required at each of the three inputs (top, middle, or bottom). This works like an AND condition; that is, all required inputs must be available before the batched item will be output. You can also specify that items from one of the inputs be "taken last" (not pulled in until all other required input items are present in the block).
Each input connector that is connected must have a quantity of items greater than zero specified in the dialog.
The default is that one item is input at the top connector and one item is output. Use the default if you just want to process or delay an item, and not make a batched item.
2) Processing:
The block will delay items for the amount of time specified or for the amount of time represented by the value of an attribute named in the dialog. Set the processing time to zero if you want to have a transformation that takes no time. The D input connector can be used to dynamically set the processing time; that input overrides the options in the dialog. If a processing time greater than zero is specified, you would usually precede the Operation block with a Stack or Repository. This would accumulate and count items waiting to be processed, since the Operation can only process one item at a time.
3) Setting or changing attributes:
You can set up to three attribute names and values for each item that enters. If an item already has attributes, the new attributes will be added to the list. You can also change the values of existing attributes: if you enter the name of the existing attribute in the dialog, the attribute value will change to what is entered in the dialog.
4) Shutting down the operation:
You can shut down the operation for a set period of time or until conditions in the model change. You can select whether the S input connector specifies the duration of the shutdown or is a true/false value indicating when the operation is shut down.
Dialog Choices
Quantity: Defines the number of input items required at each input connector (top, middle, and bottom), which must be an integer greater than or equal to 0. The transformation will not occur until all input requirements have been satisfied. The default is that one item is required from the top input and no items are required from the middle and bottom inputs.
Take last: Specifies that the item(s) from the selected input are taken last. The block will not take any items from the selected input until all the other inputs have entered the block. This option is useful when a resource, such as a person, is being shared between two or more Operation blocks.
Specify a processing time: This option is used to set the time (in simulation time units) required to perform the operation. A time of 0 means no delay. Processing time can be done in one of three ways:
• The time can be set by specifying a number in the dialog box. This choice is selected by default.
• The time can be set by selecting the "attribute named" option, and supplying the name of an attribute. The attribute can be pre-existing, or can be the attributeset in the section for "Setting or changing attributes".
• The time can be set dynamically by attaching an Equation block, Constant block, or other type of value generator to the D input connector. If the D connector is used, that value overrides any dialog choices.
Utilization: Displays the utilization rate. This shows the ratio of the time the block spends processing to the total simulation time. For example, if processing time is set to 2 minutes, and 12 processing cycles have occurred in the block during a 60 minute simulation, the utilization rate would be .40 (calculated as (2*12)/60). The idle time rate is 1-utilization.
Set or change the values of up to three attributes: If names are supplied in any of these items, the named attributes will be modified or set to the values specified. The attributes can be pre-existing or defined by the block itself. Attributes may be assigned values in one of two ways:
• values may be supplied in the dialog itself
• values may be assigned by connecting value generating blocks to the A1, A2, or A3 input connectors. If this is done, the value input will override any value supplied in the dialog.
Use S input as duration: When a value is entered through the S connector, the block is shut down for the period of time represented by that value. NOTE: this option only works properly if the value comes from a value connector on a discrete event block. It will not work properly if the value comes from a continuous block (such as a block from the Generic library). For example, it will work properly if an attribute value connector from an Operation block or Measurement block is connected to S. It will NOT work properly if an Input Random Number block's output is connected to S.
Shut down if S input is > 0.5: If this is selected and a value of > 0.5 (a TRUE value) is input through the S connector, the block is shut down until a value < 0.5 (a FALSE value) is input through the S connector.
Connectors
The three item input connectors provide items to the block.
The item output connector provides items for the model.
A1-A3 (input connectors): Take in values for up to three named attributes.
A1-A3 (output connectors): Display values of up to three attributes named in the dialog.
D: Sets processing time.
S (input connector): Interrupts and shuts down the block.
S (output connector): Shows if the block is able to operate or is shut down. Outputs a zero (0) if the block is able to operate or a 1 (one) if it is shut down.
U: Utilization. Reports the utilization rate, as discussed above.